package cn.tsvtc.shop.controller;

import cn.tsvtc.shop.constant.CookieConstant;
import cn.tsvtc.shop.entity.ResultMessage;
import cn.tsvtc.shop.service.UserService;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.CookieValue;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import javax.servlet.http.Cookie;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

/**
 * @author: Athena
 * @date: 2020/10/30 13:15
 * @description:
 */
@Controller
@RequestMapping("page")
@Slf4j
public class PageController {

    private UserService userService;

    @Autowired
    public PageController(UserService userService){
        this.userService=userService;
    }

    /**
     * 返回templates的注册页面register.html
     * @return String
     */
    @GetMapping("register")
    public String register(){
        return "register.html";
    }


    /**
     * 返回templates的注册页面login.html
     * @return String
     */
    @GetMapping("login")
    public String login(){
        return "login.html";
    }

}
